CC = gcc
CFLAGS = -c -I.. `pkg-config --cflags cmocka`
LDFLAGS = `pkg-config --libs cmocka`

SRCDIR = ../src
TEST = stream_test

stream_test_src = stream_test.c \
	$(SRCDIR)/block.c \
	$(SRCDIR)/stream.c

stream_test_obj := $(stream_test_src:.c=.o)

stream_test: $(stream_test_obj)
	$(CC) $(stream_test_obj) $(LDFLAGS)-o $@
	@echo $(stream_test_obj)

.PHONY: clean test

test:
	./stream_test
clean:
	@rm *.o
	@rm $(TEST)

